{% extends 'base.html' %}

{% block stylesheet %}
{{ block.super }}
{% endblock%}

{% block javascript %}
{{ block.super }}
<script type="text/javascript" src="{% url base_static "js/jquery.tablesorter.min.js" %}"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("#invoice_table").tablesorter();
    $('table.list tr:even').addClass("even");
});
</script>
{% endblock%}


{% block content %}
<h3>Invoice List</h3>
<div id="navi">
    <ul>
        <li><a href="{% url invoice_create %}">invoice create</a></li>
        <li><a href="{% url invoice_year_list "2011" %}">2011 Invoice list</a></li>
    </ul>
</div>

<h3>{{ year }} {{ school.name }} Summary</h3>
<table id="invoice_summary_table" class="tablesorter list">
<thead>
    <tr>
        <th>-</th>
        <th>Jan</th>
        <th>Feb</th>
        <th>Mar</th>
        <th>Apr</th>
        <th>May</th>
        <th>Jun</th>
        <th>Jul</th>
        <th>Aug</th>
        <th>Sep</th>
        <th>Oct</th>
        <th>Nov</th>
        <th>Dec</th>
        <th>Total</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td><b>Total Class Count</b></td>
        {% for p in total_class_count_dic.values %}
        <td>{{ p }}</td>
        {% endfor %}
    </tr>
    <tr>
        <td><b>Paid</b></td>
        {% for p in paid_dic.values %}
        <td>{{ p }}</td>
        {% endfor %}
    </tr>
    <tr>
        <td><b>Unpaid</b></td>
        {% for up in unpaid_dic.values %}
        <td>{{ up }}</td>
        {% endfor %}
    </tr>
    <tr>
        <td><b>Total</b></td>
        {% for tp in total_paid_dic.values %}
        <td>{{ tp }}</td>
        {% endfor %}
    </tr>
</tbody>
</table>

<h3>All Invoice</h3>
{% include "temp_invoice/_list.html" %}

{% endblock %}